﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="JYHDList.aspx.cs" Inherits="Manager_ArticleList" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>产品列表</title>
    <style type="text/css">
        .x-grid3-row-body .expander
        {
            padding-left: 30px;
            padding-top: 5px;
            padding-bottom: 5px;
        }
        .x-grid3-row-body .expander p
        {
            padding-left: 30px;
            padding-top: 5px;
            padding-bottom: 5px;
        }
        .x-grid3-row-body .expander strong
        {
            font-weight: bold;
        }
    </style>

    <script type="text/javascript">
        if (top == window) {
            window.location.href = "../Main.aspx#/ArticleAddNew.aspx";
        }

        function openHelloFineUI() {
            var node = {
                attributes: {
                    href: "/ArticleAddNew.aspx"
                },
                text: "新增文章资料",
                id: "hello_fineui_example"
            };

            //window.parent.addExampleTab(node);
            parent.addExampleTab.apply(parent, [node]);
        }
    </script>

</head>
<body>
    <form id="form1" runat="server">
    <ext:PageManager ID="PageManager1" runat="server" AjaxLoadingType="mask" AutoSizePanelID="gridList" />
    <ext:Grid ID="gridList" runat="server" AllowPaging="true" PageSize="25" ForceFitAllTime="true"
        EmptyText="暂时没有相关数据!" RowNumberWidth="40px" DataKeyNames="aId" ShowBorder="false"
        EnableRowNumber="true" IsDatabasePaging="true" EnableRowNumberPaging="true" AutoScroll="true"
        ShowHeader="false" EnableCheckBoxSelect="true" OnRowCommand="gridList_RowCommand"
        OnPageIndexChange="gridList_PageIndexChange">
        <Columns>
            <ext:TemplateField ID="tfExpander" runat="server" RenderAsRowExpander="true">
                <ItemTemplate>
                    <div class="expander">
                        <p>
                            <strong>优化关键词：</strong><%# Eval("aKeywords")%></p>
                        <p>
                            <strong>优化关描述：</strong><%# Eval("aDescription")%></p>
                        <p>
                            <strong>概要：</strong><%# Eval("aShortInstr")%></p>
                    </div>
                </ItemTemplate>
            </ext:TemplateField>
            <ext:BoundField ID="bfATitle" runat="server" HeaderText="活动名称" DataField="aTitle" />
            <ext:BoundField ID="BoundField2" runat="server" HeaderText="活动组织" DataField="aAllClassIds" />
            <ext:BoundField ID="bfAddTime" runat="server" HeaderText="活动时间" DataField="aAddTime"
                Width="120" />
            <ext:BoundField ID="bfAHits" runat="server" HeaderText="名额限制" DataField="aHits" />
            <ext:CheckBoxField ID="cboxAStatus" runat="server" HeaderText="状态" DataField="aStatus"
                Width="40" TextAlign="center" Hidden="true" />
            <ext:TemplateField runat="server" HeaderText="截止日期" TextAlign="Center">
                <ItemTemplate>
                    <%# Convert.ToDateTime(Convert.ToString(Eval("cEndDate"))).ToString("yyyy-MM-dd") %>
                </ItemTemplate>
            </ext:TemplateField>
            <ext:BoundField ID="btAOrder" runat="server" HeaderText="排序" DataField="aOrder" />
            <ext:WindowField TextAlign="Center" Width="30px" WindowID="winForm" Icon="basketEdit"
                ToolTip="编辑" DataIFrameUrlFields="aId,aClassId" DataIFrameUrlFormatString="JYHDAdd.aspx?ArticleId={0}&Class={1}"
                Title="资料编辑" />
            <ext:LinkButtonField ID="lbtnfDelete" runat="server" CommandName="Delete" ToolTip="删除当前行数据"
                Icon="delete" ConfirmText="是否确定删除当前行数据？" Width="30" TextAlign="center" />
        </Columns>
        <Toolbars>
            <ext:Toolbar ID="Toolbar1" runat="server">
                <Items>
                    <ext:ToolbarText ID="ToolbarText1" runat="server" Text="家园活动列表">
                    </ext:ToolbarText>
                    <ext:ToolbarFill ID="ToolbarFill1" runat="server">
                    </ext:ToolbarFill>
                    <ext:Label ID="lblSearchTitle" runat="server" Text="快速检索">
                    </ext:Label>
                    <ext:TwinTriggerBox ID="ttboxKeywords" ShowLabel="false" OnTrigger1Click="ttboxKeywords_Trigger1Click"
                        OnTrigger2Click="ttboxKeywords_Trigger2Click" Trigger1Icon="Clear" EmptyText="搜索关键词"
                        Trigger2Icon="Search" runat="server">
                    </ext:TwinTriggerBox>
                    <ext:ToolbarSeparator ID="ToolbarSeparator" runat="server">
                    </ext:ToolbarSeparator>
                    <ext:Button ID="btnAddArticle" runat="server" Text="新增家园活动" Icon="Add" OnClick="btnAddArticle_Click">
                    </ext:Button>
                    <ext:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
                    </ext:ToolbarSeparator>
                    <ext:Button ID="btnSelectDelete" runat="server" Text="删除选中" Icon="delete" OnClick="btnSelectDelete_Click"
                        ConfirmText="是否确定删除？" Hidden="true">
                    </ext:Button>
                </Items>
            </ext:Toolbar>
        </Toolbars>
        <PageItems>
            <ext:Button ID="btnRefresh" runat="server" Icon="arrowrefresh" OnClick="btnRefresh_Click">
            </ext:Button>
            <ext:ToolbarFill ID="ToolbarFill3" runat="server">
            </ext:ToolbarFill>
            <ext:ToolbarSeparator ID="ToolbarSeparator2" runat="server">
            </ext:ToolbarSeparator>
            <ext:ToolbarText ID="ToolbarText2" runat="server" Text="每页记录数：">
            </ext:ToolbarText>
            <ext:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true"
                OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
                <ext:ListItem Text="15" Value="15" />
                <ext:ListItem Text="20" Value="20" />
                <ext:ListItem Text="25" Value="25" Selected="true" />
            </ext:DropDownList>
        </PageItems>
    </ext:Grid>
    <ext:Window ID="winForm" runat="server" Hidden="true" Width="1000px" EnableMaximize="true"
        EnableResize="true" Height="650px" EnableIFrame="true" AutoScroll="true" CloseAction="hideRefresh">
    </ext:Window>
    </form>
</body>
</html>
